import { MyForm,MyFormItem,Input } from '../../components/Form/index';
import React from 'react'
export default  function MyFormPage() {
  const onFinish = (values) => {
    console.log('Success:', values);
  };

  const onFinishFailed = (errorInfo) => {
    console.log('Failed:', errorInfo);
  };

  return (
    <MyForm
      onFinish={onFinish}
      onFinishFailed={onFinishFailed}
    >
      <MyFormItem
        label="Username"
        name="username"
        rules={[
          {
            required: true,
            message: 'Please input your username!',
          },
        ]}
      >
        <Input />
      </MyFormItem>

      <MyFormItem
        label="Password"
        name="password"
        rules={[
          {
            required: true,
            message: 'Please input your password!',
          },
        ]}
      >
        <Input/>
      </MyFormItem> 
      <MyFormItem>
        <button>submit</button>
      </MyFormItem>
    </MyForm>
  );
};
 